<?php 

	class scan
	{
		function __construct()
		{
            /**
            include('sock.php');
            $sock = new sock;
			//$sock->open_socket('137.140.8.82');
			$sock->open_socket('localhost');
			//$r = $sock->send_data_packet('s,30,16,8,12,2011');
			$r = $sock->send_data_packet('S');
			print $r;
			$input = $sock->read_socket();
			print $input;
			//include('response.php');
			//$response = new response;
			//$scan_results_array = $response->parse_scan($r);
			//include('views/scan.php');
			$sock->close_socket();
			**/
		}
		
		function scan_now()
		{
			include('sock.php');
			$sock = new sock;
			$sock->open_socket('137.140.8.82');
			//$current_date_time = "S,".date('i,G,j,n,Y');
			//echo $current_date_time;
			$r = $sock->send_data_packet("S");
			include('response.php');
			$response = new response;
			$scan_results_array = $response->parse_scan($r);
			include('views/available_stations.php');
 			$sock->close_socket();
		}
		
		function get_stations()
		{
			include('sock.php');
			$sock = new sock;
			$sock->open_socket('localhost');
			$r = $sock->send_data_packet('S');
			$sock->close_socket();
		}
	}

?>